<?xml version="1.0" encoding="utf-8"?>
<brl xmlns="http://schemas.microsoft.com/businessruleslanguage/2002">
  <ruleset name="EDIGuidance.InBoundItineraryResolution">
    <version major="1" minor="15" description="" modifiedby="WIN-9NXPAJC07S9\Administrator" date="2009-07-23T14:17:34.0756316-04:00" />
    <configuration />
    <bindings>
      <class ref="Resolution" class="Resolution" instance="0" instances="16" selectivity="1">
        <assembly>Microsoft.Practices.ESB.Resolver, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35</assembly>
        <!--C:\Windows\assembly\GAC_MSIL\Microsoft.Practices.ESB.Resolver\2.0.0.0__31bf3856ad364e35\Microsoft.Practices.ESB.Resolver.dll-->
        <namespace>Microsoft.Practices.ESB.Resolver</namespace>
      </class>
      <class ref="ItineraryFact" class="ItineraryFact" instance="0" instances="16" selectivity="1">
        <assembly>Microsoft.Practices.ESB.Resolver.Itinerary.Facts, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35</assembly>
        <!--C:\Windows\assembly\GAC_MSIL\Microsoft.Practices.ESB.Resolver.Itinerary.Facts\2.0.0.0__31bf3856ad364e35\Microsoft.Practices.ESB.Resolver.Itinerary.Facts.dll-->
        <namespace>Microsoft.Practices.ESB.Resolver.Itinerary.Facts</namespace>
      </class>
      <xmldocument ref="xml_32" doctype="Microsoft.BizTalk.Samples.EDIGuidance.Schemas.EDIAckControlTypedPolling_InboundEDIAckControl+TypedPollingResultSet0" instances="16" selectivity="1" instance="0">
        <selector>/*[local-name()='TypedPollingResultSet0' and namespace-uri()='http://schemas.microsoft.com/Sql/2008/05/TypedPolling/InboundEDIAckControl']</selector>
        <selectoralias>/tns:TypedPollingResultSet0</selectoralias>
        <schema>C:\Projects\EDIGuidance\Main\src\Schemas\EDIAckControlTypedPolling.InboundEDIAckControl.xsd</schema>
      </xmldocument>
    </bindings>
    <rule name="997Ctrl_FromTHEM1" priority="0" active="true">
      <if>
        <and>
          <compare operator="equal">
            <vocabularylink uri="3f0e9bcc-6212-4e6a-853c-e517f157a626" element="05703dd9-1111-40b8-890d-ad7bfc45a925" />
            <lhs>
              <function>
                <vocabularylink uri="eacec640-b468-4df3-918c-bb96b6629b1a" element="1662ce6b-7f1f-483d-8327-7cb1ed233f01" />
                <classmember member="get_MessageType" sideeffects="true">
                  <classref ref="Resolution" />
                </classmember>
              </function>
            </lhs>
            <rhs>
              <constant>
                <string>http://schemas.microsoft.com/Sql/2008/05/TypedPolling/InboundEDIAckControl#TypedPollingResultSet0</string>
              </constant>
            </rhs>
          </compare>
          <compare operator="equal">
            <vocabularylink uri="3f0e9bcc-6212-4e6a-853c-e517f157a626" element="05703dd9-1111-40b8-890d-ad7bfc45a925" />
            <lhs>
              <function>
                <vocabularylink uri="eacec640-b468-4df3-918c-bb96b6629b1a" element="7c278078-782c-4e20-8006-8a6cdc4e93e3" />
                <classmember member="get_ReceiveLocationNameField" sideeffects="true">
                  <classref ref="Resolution" />
                </classmember>
              </function>
            </lhs>
            <rhs>
              <constant>
                <string>997AckControl_SQL</string>
              </constant>
            </rhs>
          </compare>
          <compare operator="equal">
            <vocabularylink uri="3f0e9bcc-6212-4e6a-853c-e517f157a626" element="05703dd9-1111-40b8-890d-ad7bfc45a925" />
            <lhs>
              <function>
                <xmldocumentmember xmldocumentref="xml_32" type="string" sideeffects="false">
                  <field>*[local-name()='ReceiverID' and namespace-uri()='http://schemas.microsoft.com/Sql/2008/05/TypedPolling/InboundEDIAckControl']</field>
                  <fieldalias>tns:ReceiverID</fieldalias>
                </xmldocumentmember>
              </function>
            </lhs>
            <rhs>
              <constant>
                <string>THEM</string>
              </constant>
            </rhs>
          </compare>
        </and>
      </if>
      <then>
        <function>
          <vocabularylink uri="2b6c9825-56c8-4c1a-811a-693b6d47f641" element="b6112cd2-bfe0-4152-b1a6-1da2a24bb971" />
          <classmember member="Name" sideeffects="true">
            <classref ref="ItineraryFact" />
            <argument>
              <constant>
                <string>Process997RelGroupRelTrans</string>
              </constant>
            </argument>
          </classmember>
        </function>
      </then>
    </rule>
    <rule name="855_FromTHEM1" priority="0" active="true">
      <if>
        <and>
          <compare operator="equal">
            <vocabularylink uri="3f0e9bcc-6212-4e6a-853c-e517f157a626" element="05703dd9-1111-40b8-890d-ad7bfc45a925" />
            <lhs>
              <function>
                <vocabularylink uri="eacec640-b468-4df3-918c-bb96b6629b1a" element="1662ce6b-7f1f-483d-8327-7cb1ed233f01" />
                <classmember member="get_MessageType" sideeffects="true">
                  <classref ref="Resolution" />
                </classmember>
              </function>
            </lhs>
            <rhs>
              <constant>
                <string>http://schemas.microsoft.com/BizTalk/EDI/X12/2006#X12_00401_855</string>
              </constant>
            </rhs>
          </compare>
          <compare operator="equal">
            <vocabularylink uri="3f0e9bcc-6212-4e6a-853c-e517f157a626" element="05703dd9-1111-40b8-890d-ad7bfc45a925" />
            <lhs>
              <function>
                <vocabularylink uri="eacec640-b468-4df3-918c-bb96b6629b1a" element="7c278078-782c-4e20-8006-8a6cdc4e93e3" />
                <classmember member="get_ReceiveLocationNameField" sideeffects="true">
                  <classref ref="Resolution" />
                </classmember>
              </function>
            </lhs>
            <rhs>
              <constant>
                <string>EDIOnRamp_THEM1_File</string>
              </constant>
            </rhs>
          </compare>
        </and>
      </if>
      <then>
        <function>
          <vocabularylink uri="2b6c9825-56c8-4c1a-811a-693b6d47f641" element="b6112cd2-bfe0-4152-b1a6-1da2a24bb971" />
          <classmember member="Name" sideeffects="true">
            <classref ref="ItineraryFact" />
            <argument>
              <constant>
                <string>855Itinerary</string>
              </constant>
            </argument>
          </classmember>
        </function>
      </then>
    </rule>
    <rule name="Resubmitted_855" priority="0" active="true">
      <if>
        <and>
          <compare operator="equal">
            <vocabularylink uri="3f0e9bcc-6212-4e6a-853c-e517f157a626" element="05703dd9-1111-40b8-890d-ad7bfc45a925" />
            <lhs>
              <function>
                <vocabularylink uri="eacec640-b468-4df3-918c-bb96b6629b1a" element="1662ce6b-7f1f-483d-8327-7cb1ed233f01" />
                <classmember member="get_MessageType" sideeffects="true">
                  <classref ref="Resolution" />
                </classmember>
              </function>
            </lhs>
            <rhs>
              <constant>
                <string>http://schemas.microsoft.com/BizTalk/EDI/X12/2006#X12_00401_855</string>
              </constant>
            </rhs>
          </compare>
          <compare operator="equal">
            <vocabularylink uri="3f0e9bcc-6212-4e6a-853c-e517f157a626" element="05703dd9-1111-40b8-890d-ad7bfc45a925" />
            <lhs>
              <function>
                <vocabularylink uri="eacec640-b468-4df3-918c-bb96b6629b1a" element="7c278078-782c-4e20-8006-8a6cdc4e93e3" />
                <classmember member="get_ReceiveLocationNameField" sideeffects="true">
                  <classref ref="Resolution" />
                </classmember>
              </function>
            </lhs>
            <rhs>
              <constant>
                <string>EDIResubmittions_HTTP</string>
              </constant>
            </rhs>
          </compare>
        </and>
      </if>
      <then>
        <function>
          <vocabularylink uri="2b6c9825-56c8-4c1a-811a-693b6d47f641" element="b6112cd2-bfe0-4152-b1a6-1da2a24bb971" />
          <classmember member="Name" sideeffects="true">
            <classref ref="ItineraryFact" />
            <argument>
              <constant>
                <string>855Itinerary</string>
              </constant>
            </argument>
          </classmember>
        </function>
      </then>
    </rule>
    <rule name="997Ctrl_FromTHEM2" priority="0" active="true">
      <if>
        <and>
          <compare operator="equal">
            <vocabularylink uri="3f0e9bcc-6212-4e6a-853c-e517f157a626" element="05703dd9-1111-40b8-890d-ad7bfc45a925" />
            <lhs>
              <function>
                <vocabularylink uri="eacec640-b468-4df3-918c-bb96b6629b1a" element="1662ce6b-7f1f-483d-8327-7cb1ed233f01" />
                <classmember member="get_MessageType" sideeffects="true">
                  <classref ref="Resolution" />
                </classmember>
              </function>
            </lhs>
            <rhs>
              <constant>
                <string>http://schemas.microsoft.com/Sql/2008/05/TypedPolling/InboundEDIAckControl#TypedPollingResultSet0</string>
              </constant>
            </rhs>
          </compare>
          <compare operator="equal">
            <vocabularylink uri="3f0e9bcc-6212-4e6a-853c-e517f157a626" element="05703dd9-1111-40b8-890d-ad7bfc45a925" />
            <lhs>
              <function>
                <vocabularylink uri="eacec640-b468-4df3-918c-bb96b6629b1a" element="7c278078-782c-4e20-8006-8a6cdc4e93e3" />
                <classmember member="get_ReceiveLocationNameField" sideeffects="true">
                  <classref ref="Resolution" />
                </classmember>
              </function>
            </lhs>
            <rhs>
              <constant>
                <string>997AckControl_SQL</string>
              </constant>
            </rhs>
          </compare>
          <compare operator="equal">
            <vocabularylink uri="3f0e9bcc-6212-4e6a-853c-e517f157a626" element="05703dd9-1111-40b8-890d-ad7bfc45a925" />
            <lhs>
              <function>
                <xmldocumentmember xmldocumentref="xml_32" type="string" sideeffects="false">
                  <field>*[local-name()='ReceiverID' and namespace-uri()='http://schemas.microsoft.com/Sql/2008/05/TypedPolling/InboundEDIAckControl']</field>
                  <fieldalias>tns:ReceiverID</fieldalias>
                </xmldocumentmember>
              </function>
            </lhs>
            <rhs>
              <constant>
                <string>THEM2</string>
              </constant>
            </rhs>
          </compare>
        </and>
      </if>
      <then>
        <function>
          <vocabularylink uri="2b6c9825-56c8-4c1a-811a-693b6d47f641" element="b6112cd2-bfe0-4152-b1a6-1da2a24bb971" />
          <classmember member="Name" sideeffects="true">
            <classref ref="ItineraryFact" />
            <argument>
              <constant>
                <string>Process997WTimeoutandReleaseGroupAck</string>
              </constant>
            </argument>
          </classmember>
        </function>
      </then>
    </rule>
    <rule name="855_FromTHEM2" priority="0" active="true">
      <if>
        <and>
          <compare operator="equal">
            <vocabularylink uri="3f0e9bcc-6212-4e6a-853c-e517f157a626" element="05703dd9-1111-40b8-890d-ad7bfc45a925" />
            <lhs>
              <function>
                <vocabularylink uri="eacec640-b468-4df3-918c-bb96b6629b1a" element="1662ce6b-7f1f-483d-8327-7cb1ed233f01" />
                <classmember member="get_MessageType" sideeffects="true">
                  <classref ref="Resolution" />
                </classmember>
              </function>
            </lhs>
            <rhs>
              <constant>
                <string>http://schemas.microsoft.com/BizTalk/EDI/X12/2006#X12_00401_855</string>
              </constant>
            </rhs>
          </compare>
          <compare operator="equal">
            <vocabularylink uri="3f0e9bcc-6212-4e6a-853c-e517f157a626" element="05703dd9-1111-40b8-890d-ad7bfc45a925" />
            <lhs>
              <function>
                <vocabularylink uri="eacec640-b468-4df3-918c-bb96b6629b1a" element="7c278078-782c-4e20-8006-8a6cdc4e93e3" />
                <classmember member="get_ReceiveLocationNameField" sideeffects="true">
                  <classref ref="Resolution" />
                </classmember>
              </function>
            </lhs>
            <rhs>
              <constant>
                <string>EDIOnRamp_THEM2_File</string>
              </constant>
            </rhs>
          </compare>
        </and>
      </if>
      <then>
        <function>
          <vocabularylink uri="2b6c9825-56c8-4c1a-811a-693b6d47f641" element="b6112cd2-bfe0-4152-b1a6-1da2a24bb971" />
          <classmember member="Name" sideeffects="true">
            <classref ref="ItineraryFact" />
            <argument>
              <constant>
                <string>855Itinerary</string>
              </constant>
            </argument>
          </classmember>
        </function>
      </then>
    </rule>
    <rule name="997_FromTHEM2" priority="0" active="true">
      <if>
        <and>
          <compare operator="equal">
            <vocabularylink uri="3f0e9bcc-6212-4e6a-853c-e517f157a626" element="05703dd9-1111-40b8-890d-ad7bfc45a925" />
            <lhs>
              <function>
                <vocabularylink uri="eacec640-b468-4df3-918c-bb96b6629b1a" element="1662ce6b-7f1f-483d-8327-7cb1ed233f01" />
                <classmember member="get_MessageType" sideeffects="true">
                  <classref ref="Resolution" />
                </classmember>
              </function>
            </lhs>
            <rhs>
              <constant>
                <string>http://schemas.microsoft.com/Edi/X12#X12_997_Root</string>
              </constant>
            </rhs>
          </compare>
          <compare operator="equal">
            <vocabularylink uri="3f0e9bcc-6212-4e6a-853c-e517f157a626" element="05703dd9-1111-40b8-890d-ad7bfc45a925" />
            <lhs>
              <function>
                <vocabularylink uri="eacec640-b468-4df3-918c-bb96b6629b1a" element="7c278078-782c-4e20-8006-8a6cdc4e93e3" />
                <classmember member="get_ReceiveLocationNameField" sideeffects="true">
                  <classref ref="Resolution" />
                </classmember>
              </function>
            </lhs>
            <rhs>
              <constant>
                <string>EDIOnRamp_THEM2_File</string>
              </constant>
            </rhs>
          </compare>
        </and>
      </if>
      <then>
        <function>
          <vocabularylink uri="2b6c9825-56c8-4c1a-811a-693b6d47f641" element="b6112cd2-bfe0-4152-b1a6-1da2a24bb971" />
          <classmember member="Name" sideeffects="true">
            <classref ref="ItineraryFact" />
            <argument>
              <constant>
                <string>Process997WTimeoutandReleaseGroupAck</string>
              </constant>
            </argument>
          </classmember>
        </function>
      </then>
    </rule>
    <rule name="997_FromTHEM1" priority="0" active="true">
      <if>
        <and>
          <compare operator="equal">
            <vocabularylink uri="3f0e9bcc-6212-4e6a-853c-e517f157a626" element="05703dd9-1111-40b8-890d-ad7bfc45a925" />
            <lhs>
              <function>
                <vocabularylink uri="eacec640-b468-4df3-918c-bb96b6629b1a" element="1662ce6b-7f1f-483d-8327-7cb1ed233f01" />
                <classmember member="get_MessageType" sideeffects="true">
                  <classref ref="Resolution" />
                </classmember>
              </function>
            </lhs>
            <rhs>
              <constant>
                <string>http://schemas.microsoft.com/Edi/X12#X12_997_Root</string>
              </constant>
            </rhs>
          </compare>
          <compare operator="equal">
            <vocabularylink uri="3f0e9bcc-6212-4e6a-853c-e517f157a626" element="05703dd9-1111-40b8-890d-ad7bfc45a925" />
            <lhs>
              <function>
                <vocabularylink uri="eacec640-b468-4df3-918c-bb96b6629b1a" element="7c278078-782c-4e20-8006-8a6cdc4e93e3" />
                <classmember member="get_ReceiveLocationNameField" sideeffects="true">
                  <classref ref="Resolution" />
                </classmember>
              </function>
            </lhs>
            <rhs>
              <constant>
                <string>EDIOnRamp_THEM1_File</string>
              </constant>
            </rhs>
          </compare>
        </and>
      </if>
      <then>
        <function>
          <vocabularylink uri="2b6c9825-56c8-4c1a-811a-693b6d47f641" element="b6112cd2-bfe0-4152-b1a6-1da2a24bb971" />
          <classmember member="Name" sideeffects="true">
            <classref ref="ItineraryFact" />
            <argument>
              <constant>
                <string>Process997RelGroupRelTrans</string>
              </constant>
            </argument>
          </classmember>
        </function>
      </then>
    </rule>
  </ruleset>
</brl>